Optimal. Leaf size=190 \[ \frac {a^2 \cos (c+d x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) \sin (c+d x) (e \sin (c+d x))^m}{d (1+m) \sqrt {\cos ^2(c+d x)}}+\frac {2 a b \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) (e \sin (c+d x))^{1+m}}{d e (1+m)}+\frac {b^2 \sqrt {\cos ^2(c+d x)} \, _2F_1\left (\frac {3}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) (e \sin (c+d x))^m \tan (c+d x)}{d (1+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.60, antiderivative size = 190, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3957, 2990,
2644, 371, 4483, 4486, 2722, 2657} \begin {gather*} \frac {a^2 \sin (c+d x) \cos (c+d x) (e \sin (c+d x))^m \, _2F_1\left (\frac {1}{2},\frac {m+1}{2};\frac {m+3}{2};\sin ^2(c+d x)\right )}{d (m+1) \sqrt {\cos ^2(c+d x)}}+\frac {2 a b (e \sin (c+d x))^{m+1} \, _2F_1\left (1,\frac {m+1}{2};\frac {m+3}{2};\sin ^2(c+d x)\right )}{d e (m+1)}+\frac {b^2 \sqrt {\cos ^2(c+d x)} \tan (c+d x) (e \sin (c+d x))^m \, _2F_1\left (\frac {3}{2},\frac {m+1}{2};\frac {m+3}{2};\sin ^2(c+d x)\right )}{d (m+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 2644
Rule 2657
Rule 2722
Rule 2990
Rule 3957
Rule 4483
Rule 4486
Rubi steps
\begin {align*} \int (a+b \sec (c+d x))^2 (e \sin (c+d x))^m \, dx &=\int (-b-a \cos (c+d x))^2 \sec ^2(c+d x) (e \sin (c+d x))^m \, dx\\ &=(2 a b) \int \sec (c+d x) (e \sin (c+d x))^m \, dx+\int \left (b^2+a^2 \cos ^2(c+d x)\right ) \sec ^2(c+d x) (e \sin (c+d x))^m \, dx\\ &=\frac {(2 a b) \text {Subst}\left (\int \frac {x^m}{1-\frac {x^2}{e^2}} \, dx,x,e \sin (c+d x)\right )}{d e}+\left (\sin ^{-m}(c+d x) (e \sin (c+d x))^m\right ) \int \left (b^2+a^2 \cos ^2(c+d x)\right ) \sec ^2(c+d x) \sin ^m(c+d x) \, dx\\ &=\frac {2 a b \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) (e \sin (c+d x))^{1+m}}{d e (1+m)}+\left (\sin ^{-m}(c+d x) (e \sin (c+d x))^m\right ) \int \left (a^2 \sin ^m(c+d x)+b^2 \sec ^2(c+d x) \sin ^m(c+d x)\right ) \, dx\\ &=\frac {2 a b \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) (e \sin (c+d x))^{1+m}}{d e (1+m)}+\left (a^2 \sin ^{-m}(c+d x) (e \sin (c+d x))^m\right ) \int \sin ^m(c+d x) \, dx+\left (b^2 \sin ^{-m}(c+d x) (e \sin (c+d x))^m\right ) \int \sec ^2(c+d x) \sin ^m(c+d x) \, dx\\ &=\frac {a^2 \cos (c+d x) \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) \sin (c+d x) (e \sin (c+d x))^m}{d (1+m) \sqrt {\cos ^2(c+d x)}}+\frac {2 a b \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) (e \sin (c+d x))^{1+m}}{d e (1+m)}+\frac {b^2 \sqrt {\cos ^2(c+d x)} \, _2F_1\left (\frac {3}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) (e \sin (c+d x))^m \tan (c+d x)}{d (1+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 134, normalized size = 0.71 \begin {gather*} \frac {(e \sin (c+d x))^m \left (2 a b \, _2F_1\left (1,\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right ) \sin (c+d x)+\sqrt {\cos ^2(c+d x)} \left (a^2 \, _2F_1\left (\frac {1}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right )+b^2 \, _2F_1\left (\frac {3}{2},\frac {1+m}{2};\frac {3+m}{2};\sin ^2(c+d x)\right )\right ) \tan (c+d x)\right )}{d (1+m)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \left (a +b \sec \left (d x +c \right )\right )^{2} \left (e \sin \left (d x +c \right )\right )^{m}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (e \sin {\left (c + d x \right )}\right )^{m} \left (a + b \sec {\left (c + d x \right )}\right )^{2}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (e\,\sin \left (c+d\,x\right )\right )}^m\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^2 \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________